<?php

class Nimblecms_Controller_Plugin_Auth extends Zend_Controller_Plugin_Abstract {

	public function preDispatch(Zend_Controller_Request_Abstract $request) {
		
		$uri = $request->getRequestUri();
		$uri = strtolower($uri);
		
		$uri = rtrim($uri, '/') . '/';
		if (strpos($uri, '/admin/') === false) {
			return;
		}
		//Switch layout Admin
		Zend_Layout::getMvcInstance()->setLayout('admin');
		
	}
}